jjzjj

get post 400

全部标签

php - Stripe 400 错误 "Invalid Positive Integer"

我有一个真正的问题。我正在尝试为一个通过Stripe向人们收费的非营利组织建立一个捐赠页面。我尝试进行的每一次收费都会给我一个错误,内容如下:已解析的请求帖子正文{"card":"TOKENWASHERE","description":"Donationby()","amount":"0","currency":"usd"}响应正文:{"error":{"type":"invalid_request_error","message":"Invalidpositiveinteger","param":"amount"}}我认为我传递给Stripe的金额有问题(显然Stripe认为它收到的

php - 为什么 get_headers() 返回 400 Bad request,而 CLI curl 返回 200 OK?

这是网址:https://www.grammarly.com我正在尝试使用nativeget_headers()获取HTTPheader功能:$headers=get_headers('https://www.grammarly.com')结果是HTTP/1.1400BadRequestDate:Fri,27Apr201812:32:34GMTContent-Type:text/plain;charset=UTF-8Content-Length:52Connection:close但是,如果我用curl命令行工具做同样的事情,结果会不同:curl-sIhttps://www.gramm

php - Zend Framework - 在oop原理中,方法 '$this->getRequest()->getPost()'如何工作?

下面的方法如何工作?$this->getRequest()->getPost();类Zend_Controller_Request_Abstract中没有方法getPost(),但它是如何工作的呢?在OOP原则中,方法getPost()应该出现在Zend_Controller_Request_Abstract中。如果没有直接实例,Zend如何在Zend_Controller_Request_Http类中拉取getPost()?谢谢。 最佳答案 Zend将首先将您的所有请求发送到FrontController,它位于Zend/Cont

php - 尝试登录时 Yii2 中的错误请求 (#400)

我在尝试登录系统时收到BadRequest(#400)错误。我在本地主机上工作。主要布局:language?>">charset;?>">title);?>head();?>查看(login.php):title='Login';$this->params['breadcrumbs'][]=$this->title;?>OpenXcellPvt.Ltd.SignintogetintouchLogin站点Controller:['class'=>AccessControl::className(),'rules'=>[['actions'=>['login','error'],'allo

PHP - $request->getPost ('first_name' )

publicfunctionprocess(Zend_Controller_Request_Abstract$request){$this->first_name=$this->sanitize($request->getPost('first_name'));....}我的问题是$request是类zend_controller_request_abstract的一个实例,但是getpost是类zend_controller_request_http中定义的一个函数,它扩展了zend_controller_request_abstract,那为什么$request直接调用getPos

php - Guzzle 检测到 400 或 500 错误时如何防止崩溃?

我正在使用PHPguzzle我试过了publicstaticfunctionget($url){$client=newClient();try{$res=$client->request('GET',$url);$result=(string)$res->getBody();$result=json_decode($result,true);return$result;}catch(GuzzleHttp\Exception\ClientException$e){$response=$e->getResponse();$responseBodyAsString=$response->ge

PHP 警告 : file_get_contents failed to open stream: HTTP request failed! HTTP/1.1 400 错误请求

我已经使用Codeigniter构建了一个本地DVD数据库,其中包含电影名称等。我想要做的是从thisIMDBAPI加载更多电影数据。.但是我收到以下错误:APHPErrorwasencounteredSeverity:WarningMessage:file_get_contents(http://www.imdbapi.com/?i=&t=2Fast2Furious)[function.file-get-contents]:failedtoopenstream:HTTPrequestfailed!HTTP/1.1400BadRequestFilename:controllers/dv

php - 无法打开流 : HTTP request failed! HTTP/1.0 400 错误请求

这是我用来查找地点的纬度和经度的代码:functioncoords($address){echo$url="http://maps.googleapis.com/maps/api/geocode/json?address=".$address;$json=file_get_contents(urlencode($url));$data=json_decode($json,TRUE);print_r($data['results'][0]['geometry']['location']['lat']);print_r($data['results'][0]['geometry']['lo

php - Yii2 自定义 url 管理。出现 400 错误

嗯,PHP时代。我的客户希望我使用Yii2作为他项目的框架。我已经启动并运行了。没问题。我通过composer使用了高级模板。将我的网站根目录设置为/frontend/web等现在,我想使用这种url格式website.com/messages/或website.com/messages/tom...等现在设置方式显示website.com/index.php?r=messages/index...我找到了这个文档...https://github.com/yiisoft/yii2/blob/master/docs/guide/url.md但我似乎无法弄清楚。这是我的步骤...我将我的

PHP curl 错误请求 400 - mapquest 地理编码

我的网址是:http://www.mapquestapi.com/geocoding/v1/batch?key=dNBvDLtTx85L3akdg8vBoHQXrWpDJSEI&location=HEBRON,KY,US&location=CINCINNATI,KY,US&location=CINCINNATI,KY,US&location=BEDFORDPARK,IL,US&location=BEDFORDPARK,IL,US&location=HODGKINS,IL,US&location=HODGKINS,IL,US&location=HODGKINS,IL,US&locatio